home *** CD-ROM | disk | FTP | other *** search
/ .net 2002 March / DotNetMagazine-Issue107-Coverdisc-NET107-02-03-PCMac.bin / pc / PC Software / free_browsing / DavesQckSearchDbar3-14 / dqsd.exe / searches / email.xml < prev    next >
Text File  |  2002-08-30  |  1KB  |  46 lines

  1. <search function="email">
  2.   <name>Email</name>
  3.   <description>
  4.     Send an email using the default handler.<br/>
  5.     <div class="helpboxDescLabels">Usage:</div>
  6.     <table class="helpboxDescTable">
  7.           <tr><td>email <<i>recipient1</i>>[,<<i>recipient2</i>>[,...]]; <<i>subject</i>>; <<i>body</i>></td></tr>
  8.       </table>
  9.   </description>
  10.   <category>Functions</category>
  11.   <contributor>Glenn Carr</contributor>
  12.   <idea>Nikolai Devereaux</idea>
  13.   
  14.   <script><![CDATA[
  15.     function email(q)
  16.     {
  17.       if( nullArgs("email",q) )
  18.         return false;
  19.         
  20.       var action = "mailto:";
  21.       var tokens = q.split( ';' );
  22.       if( tokens[0] )
  23.       {
  24.         action += tokens[0].replace(/,/, ";");
  25.         if (tokens[1])
  26.         {
  27.           var subject = tokens[1].replace( /^\s/, '' ).replace( /\s$/, '' )
  28.           action += ("?subject=" + subject);
  29.           if (tokens[2])
  30.           {
  31.             var body = tokens[2].replace( /^\s/, '' ).replace( /\s$/, '' )
  32.             action += ("&body=" + body);
  33.           }
  34.         }
  35.       }
  36.       window.location.href = action;
  37.     }
  38.   ]]></script>
  39.  
  40.   <copyright>
  41.     Copyright (c) 2002 David Bau
  42.     Distributed under the terms of the
  43.     GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  44.   </copyright>
  45. </search>
  46.